using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using Preparation;
using Tester.Forms;

namespace Tester.GuiActions.Actions.Impl
{
    public class ConfigurationsAction : BaseAction
    {
        public override bool Visible
        {
            get
            {
                 return TesterMultyDocument.Instance!=null && 
                     TesterMultyDocument.Instance.Suspended == TesterMultyDocument.SuspendStates.Stopped;
            }
        }

        public override void MainAction(object sender, EventArgs e)
        {
            if (Visible)
            {
                DocumentConfigurationsForm form = new DocumentConfigurationsForm();
                form.ShowDialog();
                TesterMainForm.Instance.UpdateConfigurationBox();
                Helper.CreateFolders(TesterMultyDocument.Instance.TestFolder, TesterMultyDocument.Instance.DocumentConfigurations);
            }
        }
    }
}
